//
//  WSJSportDataDetailViewController.m
//  RunningMan
//
//  Created by dllo on 16/5/26.
//  Copyright © 2016年 WSJ. All rights reserved.
//

#import "WSJSportDataDetailViewController.h"
#import "SportSpeedView.h"
#import "SportMapLineView.h"
@interface WSJSportDataDetailViewController ()<UIScrollViewDelegate>

@property(nonatomic, retain)SportSpeedView *speedView;
@property(nonatomic, retain)UIScrollView *scrollView;
@property(nonatomic, retain)SportMapLineView *mapLineView;

@end

@implementation WSJSportDataDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationItem.title = @"数据详情";
    self.scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
    self.scrollView.bounces = NO;
    self.scrollView.backgroundColor = [UIColor blackColor];
    self.scrollView.contentSize = CGSizeMake(0, 0.5 * HEIGHT + 300);
    //self.scrollView.pagingEnabled = YES;
    [self.view addSubview:self.scrollView];
    
    [self addMapView];
    [self creatSportView];
}


-(void)addMapView{
    self.mapLineView = [[SportMapLineView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 0.5 * HEIGHT) ];
    self.mapLineView.locationArr = [self.model.locationArr mutableCopy];
    [self.scrollView addSubview:self.mapLineView];

}


-(void)creatSportView{
    
    self.speedView = [[SportSpeedView alloc] initWithFrame:CGRectMake(0, 0.5 * HEIGHT, WIDTH, 300)];
    self.speedView.speedArr = self.model.speedArr;
    [self.scrollView addSubview:self.speedView];
    
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
